//
//  AweakCell.m
//  UIA段项目 墨家天气
//
//  Created by dllo on 15/8/28.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "AweakCell.h"

@implementation AweakCell
-(void)dealloc
{
    
    [_centerLine release];
    [_day release];
    [_night release];
    [_leftWeak release];
    [_rightWeak release];
    [_high release];
    [_low release];
    [_wind release];
    [super dealloc];

}
- (instancetype)initWithFrame:(CGRect)frame
{
    
    
    self = [super initWithFrame:frame];
    if (self) {
        
        
        
        UILabel *a = [[UILabel alloc]initWithFrame:CGRectMake(30 * OffWidth, 390 * OffHeight, 70 * OffWidth, 30 * OffHeight)];
        a.text = @"最高温 :";
        a.textColor = [UIColor whiteColor];

        UILabel *b = [[UILabel alloc]initWithFrame:CGRectMake(210 * OffWidth, 390 * OffHeight, 70 * OffWidth, 30 * OffHeight)];
        b.text = @"最低温 :";
        b.textColor = [UIColor whiteColor];
        
        [self addSubview:a];
        [self addSubview:b];
         [a release];
         [b release];
        
      
        
        self.centerLine = [[UILabel alloc]init];
        self.centerLine.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_centerLine];
        [_centerLine release];
        
        
    
        self.day = [[UILabel alloc]init];
        self.day.textColor = [UIColor whiteColor];
        self.day.text = @"白天";
        self.day.font = [UIFont boldSystemFontOfSize:20];
        [self.contentView addSubview:_day];
        [_day release];
        
        self.night  = [[UILabel alloc]init];
        self.night.textColor = [UIColor whiteColor];
        self.night.text = @"夜晚";
        self.night.font = [UIFont boldSystemFontOfSize:20];
        [self.contentView addSubview:_night];
        [_night release];
        
        self.leftWeak = [[UILabel alloc]init];
        self.leftWeak.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_leftWeak];
        [_leftWeak release];
        
        self.rightWeak = [[UILabel alloc]init];
        self.rightWeak.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_rightWeak];
        [_rightWeak release];
        
        self.high = [[UILabel alloc]init];
        self.high.textColor = [UIColor whiteColor];
        self.high.font = [UIFont boldSystemFontOfSize:30];
        [self.contentView addSubview:_high];
        [_high release];
        
        
        
        
        self.low = [[UILabel alloc]init];
        self.low.textColor = [UIColor whiteColor];
        self.low.font = [UIFont boldSystemFontOfSize:30];
        [self.contentView addSubview:_low];
        
        [_low release];
        
        
        self.yunDayImage = [[UIImageView alloc]init];

        [self.contentView addSubview:_yunDayImage];
        
        
        self.yunNightImage = [[UIImageView alloc]init];
        [self.contentView addSubview:_yunNightImage];
        self.date = [[UILabel alloc]init];
        self.date.textColor = [UIColor whiteColor];
        self.date.font = [UIFont boldSystemFontOfSize:19];
        [self.contentView addSubview:_date];
        
        
        self.highDu = [[UILabel alloc]init];
        self.highDu.font = [UIFont boldSystemFontOfSize:30];
        
        self.highDu.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_highDu];
        
        
        self.lowDu = [[UILabel alloc]init];
        self.lowDu.textColor = [UIColor whiteColor];
        self.lowDu.font = [UIFont boldSystemFontOfSize:30];
        [self.contentView addSubview:_lowDu];
        
    }
    
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.centerLine.frame = CGRectMake(self.contentView.frame.size.width / 2, 300 * OffHeight, 1, 100 * OffHeight);
    self.day.frame = CGRectMake(50 * OffWidth, 280 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.night.frame = CGRectMake(250 * OffWidth, 280 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.leftWeak .frame = CGRectMake(100 * OffWidth, 360 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.rightWeak.frame = CGRectMake(300 * OffWidth, 410 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.high.frame = CGRectMake(110 * OffWidth, 390 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.low.frame = CGRectMake(290 * OffWidth, 390 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.yunDayImage.frame = CGRectMake(55 * OffWidth, 340 * OffHeight, 30 * OffWidth, 30 * OffHeight);
    self.yunNightImage.frame = CGRectMake(260 * OffWidth, 340 * OffHeight, 30 * OffWidth, 30 * OffHeight);
    
    self.date.frame = CGRectMake((self.contentView.frame.size.width - 100) / 2 * OffWidth, 150 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    
    self.highDu.frame = CGRectMake(140 * OffWidth, 370 * OffHeight, 100 * OffWidth, 30 * OffHeight);
    self.lowDu.frame = CGRectMake(320 * OffWidth, 370 * OffHeight, 100 * OffWidth, 30 * OffHeight);

}
@end
